<template>
	<view>
		<view @click="titleClick">{{title}}</view>
		<input type="text" v-model="title" />
		<view class="out">
			<view class="row"><input class="border" type="text" placeholder="请输入连续电话" v-model="message.tel"/></view>
			<view class="row"><input class="border" type="text" placeholder="请输入姓名"  v-model="message.name"/></view>
			<view class="row"><textarea class="border" type="text" placeholder="请留言"  v-model="message.content"/></textarea>
			</view>
			<view class="row">
				<button type="primary" @click="onSubmit">提交留言</button>
			</view>
		</view>
		
		{{message.content}}
		{{message}}
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: "d标题",
				message :{
				username:"",
				tel:"",
				content:""
				}
			}
		},
		methods: {
			titleClick: function() {
				this.title = Math.random();
			},
			onSubmit(){
				console.log(this.message)
			}
		}
	}
</script>

<style lang="scss">
	.out {
		padding: 10rpx;

		.row {
			margin-bottom: 10rpx;
			width: 100%;
		}

		.border {
			border: 1rpx solid #c1c1c1;
			width: 100%;
			padding: 10rpx;
			min-height: 80rpx;
			box-sizing: border-box;
		}
	}
</style>